﻿$win = "디아블로 III"

HotKeySet("/", "Toggle")
HotKeySet("\", "Stop")
HotKeySet(",", "Swap1")
HotKeySet(".", "Swap2")

;-------------------------------------------------------------------------
Opt("PixelCoordMode", 0)
Opt("MouseCoordMode", 0)


Global $pause = True

While True
   Sleep(500)

   If ($pause = True) Then
	  ContinueLoop
   EndIf

   Send('3')
WEnd

Func Toggle()
   If $pause = True Then
	  $pause = False
   Else
	  $pause = True
   EndIf
EndFunc

Func Stop()
   Exit
EndFunc

Func Swap1()
   Local $mousePos = MouseGetPos()
   Send('i')
   Sleep(200)
   MouseClick("right", 1815, 915, 1, 0)
   Sleep(200)
   Send('i')
   MouseMove($mousePos[0], $mousePos[1], 0)
EndFunc

Func Swap2()
   Local $mousePos = MouseGetPos()
   Send('i')
   Sleep(200)
   MouseClick("right", 1873, 915, 1, 0)
   Sleep(200)
   Send('i')
   MouseMove($mousePos[0], $mousePos[1], 0)
EndFunc
